//parse elements on privacy settings page
var settingsSection = getElementsByClass("phl", null, "td");
var inputRadioButton = settingsSection[0].getElementsByTagName("input");
var checked = inputRadioButton[0].getAttribute("checked");
//inputRadioButton[0].getAttribute("checked");
inputRadioButton[0].setAttribute("checked","1");
inputRadioButton[0].setAttribute("value","40");

var settingsSection = getElementsByClass("prl", null, "td");
var inputRadioButton = settingsSection[0].getElementsByTagName("input");
var checked = inputRadioButton[0].getAttribute("checked");
//inputRadioButton[0].getAttribute("checked");
inputRadioButton[0].setAttribute("checked","0");
inputRadioButton[0].setAttribute("value","80");
//document.write(checked);

//var e = new Element();
//e.s

//send elements to server of processing

//configure privacy settings to suit the server's definitions


//helper functions
function getElementsByClass(searchClass,node,tag) {

	var classElements = new Array();

	if ( node == null )

		node = document;

	if ( tag == null )

		tag = '*';

	var els = node.getElementsByTagName(tag);

	var elsLen = els.length;

	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");

	for (i = 0, j = 0; i < elsLen; i++) {

		if ( pattern.test(els[i].className) ) {

			classElements[j] = els[i];

			j++;

		}

	}

	return classElements;

}